package com.daguchuangyi.erp_android.productlist.productsummary;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.daguchuangyi.erp_android.R;
import com.daguchuangyi.erp_android.model.product.Product;
import com.daguchuangyi.erp_android.productlist.ProductSummaryManager;

import java.util.List;

/**
 * Created by lijianjian on 2018/3/9.
 */

public class ProductSummaryAdapter extends BaseMultiItemQuickAdapter<Product, ProductSummaryViewHolder> {

    public ProductSummaryAdapter(List<Product> data) {
        super(data);
        addItemType(ProductSummaryManager.STYLE_LIST, R.layout.production_main_list_layout);
        addItemType(ProductSummaryManager.STYLE_GRID, R.layout.production_main_grid_layout);
    }

    @Override
    protected void convert(ProductSummaryViewHolder helper, Product item) {
        helper.bindProductInfo(this, item);
    }
}
